<template>
	<div class="mobile">
		<div class="nav-top">
			<div class="left">
				<router-link to="/portal/netm"><img src="../../../assets/img/phone-back.png" alt=""></router-link>
			</div>
			<div class="right">
				<span>民情动态</span>
				<img src="../../../assets/img/phone-more.png" alt="">
			</div>

		</div>
		<div class="trends-form">
			<div class="form-detail">
				<div class="form-list" v-for="item in trendsList" @click="goDetail(item.opinionId)">
					<h5>{{ item.title }}</h5>
					<div class="text"><span>联系对象：{{ item.voterName }}</span><span>联系人：{{ item.voterName}}</span></div>
					<p>{{ item.contactInfo }}</p>
					<div class="operate">
						<div class="left">
							{{ item.feedbackTime }}
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="trends-nav">
			<div class="item"><router-link :to="{ path: '/portal/net/trendsAddm'}"><img src="../../../assets/img/phone-icon1.png" alt="">新建动态</router-link></div>
			<div class="item active"><img src="../../../assets/img/phone-icon2.png" alt="">历史记录</div>
		</div>
	</div>
</template>

<script>
import { getTrendsList } from "@/api/website";

export default {
	data() {
		return {
			trendsList: []
		}
	},
	components: {
	},
	created() {
		this.userInfo = JSON.parse(sessionStorage.getItem("useInfo"))
		this.init();
	},
	mounted() {

	},
	methods: {
		init() {
			getTrendsList({ id: this.userInfo.id }).then(response => {
				this.trendsList = response.rows;
			});
		},
		goDetail(id){
			this.$router.replace({ path: '/portal/net/trendsDetailm' + '?id=' + id })
		}
	}

};
</script>

<style scoped lang="scss"></style>